import time
import requests
import json
import re
import csv
from operator import itemgetter


nid = '598614273525'

goods_url = 'https://detail.m.tmall.com/item.htm?spm=a320p.7692363.0.0.12dbc423E7Y7NI&id=' + nid

shopNames = '"shopName":"(.*?)"'  #店铺名称
titles = '"title":"(.*?)"'  # 商品名称
subtitles = '"subtitle":"(.*?)"'  #描述
kws = '"口味":"(.*?)"'
hls = '"净含量":"(.*?)"'
cms = '"厂名":"(.*?)"'
czs = '"厂址":"(.*?)"'
dhs = '"厂家联系方式":"(.*?)"'
priceTexts = '"priceText":"(.*?)"'
sellCounts = '"sellCount":"(.*?)"'

images = '"images":\["(.*?)"' 

rows = ['店铺名称', '商品名称', '描述', '口味', '净含量', '厂名', '厂址', '厂家联系方式']



res = requests.get(goods_url)
html = res.text

shopName = re.findall(sellCounts,html)

print(html)